package com.codedancer.campus.common.config;

import com.github.qcloudsms.SmsSingleSender;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@ConfigurationProperties("smsconfig.tx")
@Component
@Data
public class SmsConfig {

    // 腾讯云短信应用id
    private Integer appid;
    // 腾讯云短信应用key
    private String appkey;
    // 签名内容
    private String signcontent;

    @Bean
    public SmsSingleSender smsSingleSender() {
        return new SmsSingleSender(appid, appkey);
    }
}
